package com.sinosoft.dsp.system.core.vfs;

import com.sinosoft.dsp.system.core.property.OverlayPropertyHandler;

public class VFSParameters {
	private String type;

	private String ftpPrefix;

	private String localPrefix;

	public VFSParameters() {
		this.type = OverlayPropertyHandler.getInstance().getProperty(
				"vfs.repository.type");
		this.ftpPrefix = OverlayPropertyHandler.getInstance().getProperty(
				"vfs.repository.type.ftp");
		this.localPrefix = OverlayPropertyHandler.getInstance().getProperty(
				"vfs.repository.type.local");
	}

	public String getVFSPrefix() {
		if ("ftp".equalsIgnoreCase(this.type)) {
			return ftpPrefix;
		} else {
			return localPrefix;
		}
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getFtpPrefix() {
		return ftpPrefix;
	}

	public void setFtpPrefix(String ftpPrefix) {
		this.ftpPrefix = ftpPrefix;
	}

	public String getLocalPrefix() {
		return localPrefix;
	}

	public void setLocalPrefix(String localPrefix) {
		this.localPrefix = localPrefix;
	}
}
